<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<link rel="stylesheet" href="css/popup.css">
	</head>
	<body>
		<button onclick="singleDate()">单选</button>
		<button onclick="multipleDate()">多选</button>
		<script src="js/popup.js"></script>
		<script>
			var list = [{
					label: '第一',
					value: '1'
				},
				{
					label: '第二',
					value: '2'
				},
				{
					label: '第三',
					value: '3'
				}]
			var data = []
			// 单选
			function singleDate() {
				var selectPopup = new popup({
					type: 0,
					title: '单选面板',
					list: list,
					checkedList: data,
					cancelFunc: function() {
						
						console.log("取消");
					},
					confirmFunc: function(res) {
						console.log("确认");
						console.log(res);
						data = res
					}
				});
				selectPopup.show();
			};
			var mulData = []
			// 多选
			function multipleDate() {
			    var selectPopup = new popup({
			        type: 1,
					title: '单选面板',
					list: list,
					checkedList: mulData,
			        cancelFunc: function () {
			            console.log("取消")
			        },
			        confirmFunc: function (res) {
			            console.log("确认")
			            console.log(res)
						mulData=res
			        }
			    });
			    selectPopup.show();
			};
		</script>
	</body>
</html>
